/*
 * @Author: 肖思汗 
 * @Date: 2025-06-25 09:26:19 
 * @Last Modified by: 肖思汗
 * @Last Modified time: 2025-06-26 21:05:17
 */


import Api from "src/api/Api";
//接口模版
class TemplateModelApi extends Api {

    constructor() {
        super();
    }

    //模板分组列表查询
    listTemplateGroup() {
        return this._get("/system/template/group/tree/listTemplateGroup");
    }

    //模板列表分页查询
    async getTemplateList(params: {
        pageNum: number;
        pageSize: number;
        templateGroupId: number;
    }) {
        const res = await this._get("/system/template/listTemplatePage", {
            ifShow: true,
            ...params
        });
        res.rows.map((item) => {
            item.designData = JSON.parse(item.designData);
        });
        return res;
    }





}

const templateModelApi = new TemplateModelApi();

export default templateModelApi;